home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_PRO / DS-1.ZIP;1 / H.ZIP / RPROTO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-10  |  12.9 KB  |  327 lines

  1. /*
  2.  * Prototypes for run-time functions.
  3.  */
  4.  
  5. /*
  6.  * Prototypes common to the compiler and interpreter.
  7.  */
  8.  
  9. int    interp    Params((int fsig,dptr cargp));
  10. novalue    EVInit    Params((char *exename,char *outname));
  11. novalue    EVSetup    Params((noargs));
  12. novalue    EVTerm    Params((int n,char *part2));
  13. word    add    Params((word a,word b));
  14. word    mul    Params((word a,word b));
  15. word    sub    Params((word a,word b));
  16. int    dp_pnmcmp    Params((struct pstrnm *pne,dptr dp));
  17. int    getvar    Params((char *s,dptr vp));
  18. word    neg    Params((word a));
  19. int    pstrnmcmp    Params((struct pstrnm *a,struct pstrnm *b));
  20. novalue    xmfree    Params((noargs));
  21. novalue    icon_init    Params((char *name));
  22. novalue    inttrap    Params((noargs));
  23. char    *alcstr            Params((char *s,word slen));
  24. char    *blkreserve        Params((word nbytes));
  25. char    *findfile        Params((word *ipc));
  26. char    *strreserve        Params((word nbytes));
  27. int    activate    Params((dptr val, struct b_coexpr *ncp, dptr result));
  28. int    anycmp            Params((dptr dp1,dptr dp2));
  29. int    bfunc            Params((noargs));
  30. int    co_chng    Params((struct b_coexpr *ncp, struct descrip *valloc, struct descrip *rsltloc, int swtch_typ, int first));
  31. int    cnv_c_dbl        Params((dptr s, double *d));
  32. int    cnv_c_int        Params((dptr s, C_integer *d));
  33. int    cnv_c_str        Params((dptr s, dptr d));
  34. int    cnv_cset        Params((dptr s, dptr d));
  35. int    cnv_ec_int        Params((dptr s, C_integer *d));
  36. int    cnv_eint        Params((dptr s, dptr d));
  37. int    cnv_int            Params((dptr s, dptr d));
  38. int    cnv_real        Params((dptr s, dptr d));
  39. int    cnv_str            Params((dptr s, dptr d));
  40. int    cnv_tcset        Params((struct b_cset *cbuf, dptr s, dptr d));
  41. int    cnv_tstr        Params((char *sbuf, dptr s, dptr d));
  42. int    coswitch        Params((word *old, word *new, int first));
  43. int    cplist            Params((dptr dp1,dptr dp2,word i,word j));
  44. int    cpset            Params((dptr dp1,dptr dp2,word size));
  45. int    csetcmp            Params((unsigned int *cs1,unsigned int *cs2));
  46. int    cssize            Params((dptr dp));
  47. int    def_c_dbl        Params((dptr s, double df, double * d));
  48. int    def_c_int        Params((dptr s, C_integer df, C_integer * d));
  49. int    def_c_str        Params((dptr s, char * df, dptr d));
  50. int    def_cset        Params((dptr s, struct b_cset * df, dptr d));
  51. int    def_ec_int        Params((dptr s, C_integer df, C_integer * d));
  52. int    def_eint        Params((dptr s, C_integer df, dptr d));
  53. int    def_int            Params((dptr s, C_integer df, dptr d));
  54. int    def_real        Params((dptr s, double df, dptr d));
  55. int    def_str            Params((dptr s, dptr df, dptr d));
  56. int    def_tcset Params((struct b_cset *cbuf,dptr s,struct b_cset *df,dptr d));
  57. int    def_tstr        Params((char *sbuf, dptr s, dptr df, dptr d));
  58. int    doasgn            Params((dptr dp1,dptr dp2));
  59. int    doimage            Params((int c,int q));
  60. int    equiv            Params((dptr dp1,dptr dp2));
  61. int    err            Params((noargs));
  62. int    findipc            Params((int line));
  63. int    findline        Params((word *ipc));
  64. int    getstrg            Params((char *buf,int maxi,FILE *fd));
  65. int    lexcmp            Params((dptr dp1,dptr dp2));
  66. int    numcmp            Params((dptr dp1,dptr dp2,dptr dp3));
  67. int    pushact        Params((struct b_coexpr *ce, struct b_coexpr *actvtr));
  68. int    putstr            Params((FILE *f,dptr d));
  69. int    qlcmp            Params((dptr  *q1,dptr  *q2));
  70. int    qtos    Params((dptr dp,char *sbuf));
  71. int     radix    Params((int sign, register int r, register char *s,
  72.                        register char *end_s, union numeric *result));
  73. novalue    addmem     Params((struct b_set *ps,struct b_selem *pe, union block **pl));
  74. novalue    adjust            Params((char *source,char *dest));
  75. novalue    c_exit            Params((int i));
  76. novalue    co_init            Params((struct b_coexpr *sblkp));
  77. novalue    coacttrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  78. novalue    cofailtrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  79. novalue    corettrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  80. novalue    cofree            Params((noargs));
  81. novalue    compact            Params((char *source));
  82. novalue    datainit        Params((noargs));
  83. novalue    deallocate        Params((union block *bp));
  84. novalue    drunerr            Params((int n, double v));
  85. novalue    env_int    Params((char *name,word *variable,int non_neg, uword limit));
  86. novalue    error            Params((char *s));
  87. novalue    err_msg            Params((int n, dptr v));
  88. novalue    fatalerr        Params((int n,dptr v));
  89. novalue    fpetrap            Params((noargs));
  90. novalue    iconhost        Params((char *hostname));
  91. novalue    irunerr            Params((int n, C_integer v));
  92. novalue    markblock        Params((dptr dp));
  93. novalue    markptr            Params((union block **));
  94. novalue    mksubs    Params((dptr var,dptr val,word i,word j, dptr result));
  95. novalue    mvc            Params((uword n,char *src,char *dest));
  96. novalue    outimage        Params((FILE *f,dptr dp,int restrict));
  97. novalue    postqual        Params((dptr dp));
  98. novalue    resolve            Params((noargs));
  99. novalue    scollect        Params((word extra));
  100. novalue    segvtrap        Params((noargs));
  101. novalue    stkdump            Params((int));
  102. novalue    sweep            Params((struct b_coexpr *ce));
  103. novalue    syserr            Params((char *s));
  104. struct    astkblk *alcactiv    Params((noargs));
  105. struct    b_coexpr *popact    Params((struct b_coexpr *ce));
  106. struct    b_coexpr *topact    Params((struct b_coexpr *ce));
  107. struct    b_cset *alccset        Params((noargs));
  108. struct    b_file *alcfile        Params((FILE *fd,int status,dptr name));
  109. struct    b_lelem *alclstb    Params((uword nslots,uword first,uword nused));
  110. struct    b_list *alclist        Params((uword size));
  111. struct    b_real *alcreal        Params((double val));
  112. struct    b_selem *alcselem    Params((dptr mbr,uword hn));
  113. struct    b_slots *alcsegment    Params((word nslots));
  114. struct    b_telem *alctelem    Params((noargs));
  115. struct    b_tvtbl *alctvtbl    Params((dptr tbl,dptr ref,uword hashnum));
  116. struct    b_proc    *bi_strprc    Params((dptr s, C_integer arity));
  117. union block *alchash        Params((int tcode));
  118. union block *hgfirst    Params((union block *bp, struct hgstate *state));
  119. union block *hgnext    Params((union block*b,struct hgstate*s,union block *e));
  120. union block *hmake    Params((int tcode,word nslots,word nelem));
  121. union block **memb    Params((union block *pb,dptr x,uword hn, int *res));
  122. union block **hchain        Params((union block *pb,uword hn));
  123. uword    hash            Params((dptr dp));
  124. word    cvpos            Params((long pos,long len));
  125. word    longread        Params((char *s,int width,long len,FILE *fname));
  126. word    prescan            Params((dptr d));
  127.  
  128. int    c_get        Params((struct b_list *hp, struct descrip *res));
  129. void    c_put        Params((struct descrip *l, struct descrip *val));
  130.  
  131.  
  132. #if !HIGHC_386
  133. int    dup2        Params((int h1, int h2));
  134. #endif                    /* !HIGHC_386 */
  135.  
  136. char *qsearch    Params((char *key,char *base,int nel,int width, int (*cmp)()));
  137.  
  138. /*
  139.  * Temporary fix
  140.  */
  141.  
  142. #if ARM
  143. FILE *popen
  144.  
  145. #endif                    /* ARM */
  146. #if ATARI_ST
  147. char    *sbrk            Params((int incr));
  148. #endif                                  /* ATARI_ST */
  149.  
  150. #if HIGHC_386
  151. int    brk        Params((char *p));
  152. char    *sbrk        Params((int n));
  153. #endif                    /* HIGHC_386 */
  154.  
  155. #if MACINTOSH
  156. #if MPW
  157. char    *brk            Params((char *addr));
  158. char    *sbrk            Params((int incr));
  159. novalue    free            Params((char* addr));
  160. #endif                    /* MPW */
  161. #endif                    /* MACINTOSH */
  162.  
  163. #if MVS || VM
  164. #if SASC
  165. #define brk(x) sbrk(((char *)(x))-sbrk(0))
  166. char    *sbrk                   Params((int incr));
  167. #endif                    /* SASC */
  168. novalue free                    Params((void* addr));
  169. #endif                                  /* MVS || VM */
  170.  
  171. #if UNIX || VMS
  172. /*
  173.  * We use old-style declarations instead of prototypes here to avoid conflicts
  174.  *  with system definitions.  For example, some <stdio.h> files don't declare
  175.  *  popen; some declare it with char * args; and some specify const char *.
  176.  */
  177. char    *brk    ();
  178. int    chdir    ();
  179. FILE    *popen    ();
  180. char    *sbrk    ();
  181. #endif                                  /* UNIX || VMS */
  182.  
  183. #ifdef Coexpr
  184. novalue new_context        Params((int fsig, dptr cargp));
  185. #endif                    /* Coexpr */
  186.  
  187.  
  188. #ifdef LargeInts
  189. struct    b_bignum *alcbignum    Params((word n));
  190. word    bigradix        Params((int sign, int r, char *s, char *x, union numeric *result));
  191. double    bigtoreal        Params((dptr da));
  192. int    realtobig        Params((dptr da, dptr dx));
  193. int    bigtos            Params((dptr da, dptr dx));
  194. novalue    bigprint        Params((FILE *f, dptr da));
  195. int    cpbignum        Params((dptr da, dptr db));
  196. int    bigadd            Params((dptr da, dptr db, dptr dx));
  197. int    bigsub            Params((dptr da, dptr db, dptr dx));
  198. int    bigmul            Params((dptr da, dptr db, dptr dx));
  199. int    bigdiv            Params((dptr da, dptr db, dptr dx));
  200. int    bigmod            Params((dptr da, dptr db, dptr dx));
  201. int    bigneg            Params((dptr da, dptr dx));
  202. int    bigpow            Params((dptr da, dptr db, dptr dx));
  203. int    bigand            Params((dptr da, dptr db, dptr dx));
  204. int    bigor            Params((dptr da, dptr db, dptr dx));
  205. int    bigxor            Params((dptr da, dptr db, dptr dx));
  206. int    bigshift        Params((dptr da, dptr db, dptr dx));
  207. word    bigcmp            Params((dptr da, dptr db));
  208. int    bigrand            Params((dptr da, dptr dx));
  209. #endif                    /* LargeInts */
  210.  
  211.  
  212. /*
  213.  * Prototypes for the run-time system.
  214.  */
  215.  
  216. C_integer    iipow    Params((C_integer n1, C_integer n2));
  217. int    bfunc    Params((noargs));
  218. int    collect    Params((int region, word nbytes));
  219. int    cvcset    Params((dptr dp,int * *cs,int *csbuf));
  220. int    cvnum    Params((dptr dp,union numeric *result));
  221. int    cvreal    Params((dptr dp,double *r));
  222. int    eq    Params((dptr dp1,dptr dp2));
  223. int    fixtrap    Params((noargs));
  224. int    getimage    Params((dptr dp1, dptr dp2));
  225. int    get_name    Params((dptr dp1, dptr dp2));
  226. int    getstrg    Params((char *buf,int maxi,FILE *fd));
  227. int    mkreal    Params((double r,dptr dp));
  228. int    nthcmp    Params((dptr d1,dptr d2));
  229. void    nxttab    Params((C_integer *col, dptr *tablst, dptr endlst, C_integer *last, C_integer *interval));
  230. int    order    Params((dptr dp));
  231. int    printable    Params((int c));
  232. int    ripow    Params((double r, C_integer n, dptr rslt));
  233. int    sig_rsm    Params((noargs));
  234. int    subs_asgn    Params((dptr dest, dptr src));
  235. int    trcmp3    Params((struct dpair *dp1,struct dpair *dp2));
  236. int    trefcmp    Params((dptr d1,dptr d2));
  237. int    tvalcmp    Params((dptr d1,dptr d2));
  238. int    tvcmp4    Params((struct dpair *dp1,struct dpair *dp2));
  239. long    ckadd    Params((long i, long j));
  240. long    ckmul    Params((long i, long j));
  241. long    cksub    Params((long i, long j));
  242. novalue    cmd_line    Params((int argc, char **argv, dptr rslt));
  243. novalue    cotrace    Params((struct b_coexpr *ccp, struct b_coexpr *ncp, int swtch_typ, dptr valloc));
  244. novalue    deref    Params((dptr dp1, dptr dp2));
  245. novalue    envset    Params((noargs));
  246. novalue    hgrow    Params((union block *bp));
  247. novalue    hshrink    Params((union block *bp));
  248. novalue    init    Params((char *name, int trc_init));
  249. novalue    rtos            Params((double n,dptr dp,char *s));
  250. novalue    tvtbl_asgn    Params((dptr dest, dptr src));
  251. novalue    varargs    Params((dptr argp, int nargs, dptr rslt));
  252. struct    b_coexpr *alccoexp    Params((noargs));
  253. struct    b_coexpr *create   Params((continuation fnc, struct b_proc *p, int ntemps, int wrk_size));
  254. struct    b_external *alcextrnl    Params((int n));
  255. struct    b_record *alcrecd    Params((int nflds,union block *recptr));
  256. struct    b_proc *strprc    Params((dptr s, C_integer arity));
  257. struct    b_tvsubs *alcsubs    Params((word len,word pos,dptr var));
  258.  
  259. #ifdef MemMon
  260. novalue    MMInit    Params((char *name));
  261. novalue    MMTerm    Params((char *part1, char *part2));
  262. novalue    MMAlc    Params((word len, int type));
  263. novalue    MMBGC    Params((int region));
  264. novalue    MMEGC    Params((noargs));
  265. novalue    MMMark    Params((char *block, int type));
  266. novalue    MMOut    Params((char *prefix, char *msg));
  267. novalue    MMShow    Params((dptr dp, int colr));
  268. novalue    MMStat    Params((char *a, word n, int c));
  269. novalue    MMStr    Params((word slen));
  270. novalue    MMSMark    Params((char *saddr, word slen));
  271. #endif                    /* MemMon */
  272.  
  273. novalue EVVal    Params((word value, int event));
  274.  
  275. #ifdef EventMon
  276. novalue EVQval    Params((dptr dp, int j));
  277. novalue EVValD    Params((dptr dp, int event));
  278. novalue vanquish Params((struct gf_marker *gfp));
  279. #endif                    /* EventMon */
  280.  
  281.  
  282. #ifdef MultiRegion
  283. struct region *AlcNewReg Params((word nbytes, word stdsize));
  284. #endif                    /* MultiRegion */
  285.  
  286. /* pointer    memcpy    Params((char *dest,char *src, int c)); */
  287.  
  288. #if COMPILER
  289. novalue    tracebk    Params((struct p_frame *lcl_pfp,dptr argp));
  290. int    invoke    Params((int nargs,dptr args, dptr rslt, continuation cont));
  291. int    xdisp    Params((struct p_frame *fp,dptr dp,int count, FILE *f));
  292. novalue    atrace    Params((noargs));
  293. novalue    ctrace    Params((noargs));
  294. novalue    failtrace    Params((noargs));
  295. novalue    rtrace    Params((noargs));
  296. novalue    strace    Params((noargs));
  297. novalue    initalloc    Params((noargs));
  298. struct    b_refresh *alcrefresh    Params((int na,int nl, int nt, int wk_sz));
  299. #else                    /* COMPILER */
  300.  
  301. #define Fargs dptr cargp
  302.  
  303. int    invoke    Params((int nargs, dptr *cargs, int *n));
  304. int    xdisp    Params((struct pf_marker *fp,dptr dp,int count, FILE *f));
  305.  
  306. int    Obscan            Params((int nargs,Fargs));
  307. int    Ocreate            Params((word *entryp,Fargs));
  308. int    Oescan            Params((int nargs,Fargs));
  309. int    Ofield            Params((int nargs,Fargs));
  310. int    Olimit            Params((int nargs,Fargs));
  311. int    Ollist            Params((int nargs,Fargs));
  312. int    Omkrec            Params((int nargs,Fargs));
  313. novalue    atrace    Params((dptr dp));
  314. novalue    ctrace    Params((dptr dp, int nargs, dptr arg));
  315. novalue    failtrace    Params((dptr dp));
  316. novalue    rtrace    Params((dptr dp, dptr rval));
  317. novalue    strace    Params((dptr dp, dptr rval));
  318. novalue    retderef        Params((dptr svalp, dptr ivalp, word *low));
  319. novalue    initalloc    Params((word codesize));
  320. struct    b_refresh *alcrefresh    Params((word *e, int nl, int nt));
  321.  
  322. #ifdef ExternalFunctions
  323. dptr    extcall            Params((dptr x, int nargs, int *signal));
  324. #endif                    /* ExternalFunctions */
  325.  
  326. #endif                    /* COMPILER */
  327.